// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DataflowBatch generated by hbm2java
 */
@Entity
@Table(name = "dataflow_batch", catalog = "magento")
public class DataflowBatch implements java.io.Serializable {

	private Integer batchId;
	private DataflowProfile dataflowProfile;
	private CoreStore coreStore;
	private String adapter;
	private String params;
	private Date createdAt;
	private Set dataflowBatchExports = new HashSet(0);
	private Set dataflowBatchImports = new HashSet(0);

	public DataflowBatch() {
	}

	public DataflowBatch(DataflowProfile dataflowProfile, CoreStore coreStore) {
		this.dataflowProfile = dataflowProfile;
		this.coreStore = coreStore;
	}

	public DataflowBatch(DataflowProfile dataflowProfile, CoreStore coreStore,
			String adapter, String params, Date createdAt,
			Set dataflowBatchExports, Set dataflowBatchImports) {
		this.dataflowProfile = dataflowProfile;
		this.coreStore = coreStore;
		this.adapter = adapter;
		this.params = params;
		this.createdAt = createdAt;
		this.dataflowBatchExports = dataflowBatchExports;
		this.dataflowBatchImports = dataflowBatchImports;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "batch_id", unique = true, nullable = false)
	public Integer getBatchId() {
		return this.batchId;
	}

	public void setBatchId(Integer batchId) {
		this.batchId = batchId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "profile_id", nullable = false)
	public DataflowProfile getDataflowProfile() {
		return this.dataflowProfile;
	}

	public void setDataflowProfile(DataflowProfile dataflowProfile) {
		this.dataflowProfile = dataflowProfile;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id", nullable = false)
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Column(name = "adapter", length = 128)
	public String getAdapter() {
		return this.adapter;
	}

	public void setAdapter(String adapter) {
		this.adapter = adapter;
	}

	@Column(name = "params", length = 65535)
	public String getParams() {
		return this.params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "dataflowBatch")
	public Set getDataflowBatchExports() {
		return this.dataflowBatchExports;
	}

	public void setDataflowBatchExports(Set dataflowBatchExports) {
		this.dataflowBatchExports = dataflowBatchExports;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "dataflowBatch")
	public Set getDataflowBatchImports() {
		return this.dataflowBatchImports;
	}

	public void setDataflowBatchImports(Set dataflowBatchImports) {
		this.dataflowBatchImports = dataflowBatchImports;
	}

}
